package cn.lsh.mapper;

import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import cn.lsh.pojo.User;

public interface UserMapper {

	public User findByUserName(String username);
	
	public User createUser(User user);
	
	public void updatePassword(@Param("userId")Long userId,@Param("password")String newPassword);
	
	public void correlationRole(Long userId,Long roleId);
	
	public void uncorrelationRole(Long userId,Long roleId);
	
	public Set<String> findRoles(String username);
	
	public Set<String> findPermissions(String username);
	
	public List<User> findUsers();
}
